﻿<phone:PhoneApplicationPage 
    x:Class="AllenalaMente.Menu.GamesListTest"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:my="clr-namespace:AllenalaMente.Menu"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Landscape" Orientation="Landscape"
    mc:Ignorable="d" d:DesignHeight="480" d:DesignWidth="800"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot è la griglia radice in cui viene inserito tutto il contenuto della pagina-->
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contiene il nome dell'applicazione e il titolo della pagina-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" >
            <TextBlock x:Name="PageTitle" Text="Pratica" FontSize="56" FontFamily="Comic Sans MS" Foreground="White" Margin="10,0,0,0"/>
        </StackPanel>

        <!--Banner-->
        <my:CarouselBanner HorizontalAlignment="Left" Margin="320,0,0,0" x:Name="carouselBanner" VerticalAlignment="Top" />

        <!--ContentPanel - inserire ulteriore contenuto qui-->
        <Grid x:Name="ContentPanel" Grid.Row="1" >

            <TextBlock x:Name="TextName" FontFamily="Comic Sans MS" Text="GAME" Width="300" VerticalAlignment="Center" Margin="30,0,600,350" Foreground="White"></TextBlock>
            <TextBlock x:Name="TextScore" FontFamily="Comic Sans MS" Text="BEST SCORE" Width="300" VerticalAlignment="Center" Margin="70,0,200,350" TextAlignment="Center" Foreground="White" />

            <ListBox Height="320" HorizontalAlignment="Left" Margin="20,52,0,0" Name="listBoxGames" VerticalAlignment="Top" Width="493" FontSize="28" SelectionChanged="listBoxGames_SelectionChanged">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Canvas Width="400" Height="60">
                                <Rectangle x:Name="RectBackground" Width="400" Height="50" Canvas.Left="0" Fill="{Binding color}" Opacity="0.5"/>
                                <Image x:Name="Icon" Source="{Binding path}" Width="50" Height="50" Canvas.Left="5"/>
                <TextBlock x:Name="TextSpace" FontFamily="Assets/Fonts/BAVEUSE.TTF#Baveuse" Text="  " Width="5" Height="60" Canvas.Left="25"/>
                <TextBlock x:Name="TextName" FontFamily="Assets/Fonts/BAVEUSE.TTF#Baveuse" Text="{Binding name}" Width="250" VerticalAlignment="Center" Canvas.Left="60"/>
                <TextBlock x:Name="TextSpace2" FontFamily="Assets/Fonts/BAVEUSE.TTF#Baveuse" Text="  " Width="10" Canvas.Left="215"/>
                <TextBlock x:Name="TextBestScore" FontFamily="Assets/Fonts/BAVEUSE.TTF#Baveuse" Text="{Binding bestScore}" Width="145" VerticalAlignment="Center" FontSize="20" Canvas.Left="300" />
                            </Canvas>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>


      <Canvas Margin="600,-40,0,0">
        <Ellipse Height="160" HorizontalAlignment="Left" Margin="-52,33,0,0" Width="250" Name="ellipse1" Stroke="Black" StrokeThickness="1" VerticalAlignment="Top" Fill="White" />
        <Image Name="imgLittleNut" Source="/AllenalaMente;component/Assets/Images/UI/LittleNut.png" Stretch="UniformToFill" Margin="90,180,662,96" Width="159">
          <Image.RenderTransform>
            <ScaleTransform ScaleX="-1"></ScaleTransform>
          </Image.RenderTransform>
        </Image>
        <Image Name="imgBalloon" Source="/AllenalaMente;component/Assets/Images/UI/Balloon.png" Width="40" Height="60" Stretch="Uniform" Margin="76,172,640,187" />
        <TextBlock Height="150" HorizontalAlignment="Left" Margin="1,27,0,0" Name="textBlockComix" TextWrapping="Wrap" Text="Seleziona un gioco e premi start per iniziare a fare pratica!" VerticalAlignment="Top" Width="219" TextAlignment="Center" Foreground="Black" FontFamily="Comic Sans MS" Canvas.Top="40" Canvas.Left="-31" />


      </Canvas>

        <Button Template="{StaticResource GreenTemplate}" Content="Start" Height="176" HorizontalAlignment="Left" Margin="500,0,0,-44" Name="buttonGo" VerticalAlignment="Bottom" Width="215" Click="buttonGo_Click" FontSize="24" Foreground="Black" />
        </Grid>
        <Grid.Background>
            <ImageBrush ImageSource="/AllenalaMente;component/Assets/Images/Backgrounds/Background.jpg" />
        </Grid.Background>
    </Grid>

</phone:PhoneApplicationPage>
